﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.HipcConfigurationTools.Domain
{
    /// <summary>
    /// 音频连接的请求
    /// </summary>
    /// <remarks>
    /// typedef struct 
    /// {
    ///     T_HIPC_NET_HEADER	   head;
    ///     Int8   mode;//暂无定义
    ///     Int8   playID; //音频播放ID(解码端)
    ///     Int8   srcIP[20]; //源IP地址(编码端)
    ///     UInt32 srcChannel; //通道号(编码端)
    /// } T_HIPC_VWAS_DEC_AUDIO_CONNECT_REQ;
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct T_HIPC_VWAS_DEC_AUDIO_CONNECT_REQ
    {
        #region Fields

        /// <summary>
        /// 网络协议数据头
        /// </summary>
        public T_HIPC_NET_HEADER head;

        /// <summary>
        /// 暂无定义
        /// </summary>
        public byte mode;

        /// <summary>
        /// 音频播放ID(解码端)
        /// </summary>
        public byte playID;

        /// <summary>
        /// 源IP地址(编码端)
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        public byte[] srcIP;

        /// <summary>
        /// 通道号(编码端)
        /// </summary>
        public UInt32 srcChannel;

        #endregion
    }
}
